import type { AppRouteModule } from '@/router/types';
import { RoleEnum } from '@/enums/roleEnum';

import { LAYOUT } from '@/router/constant';

const user: AppRouteModule = {
  path: '/user',
  name: 'User',
  component: LAYOUT,
  redirect: '/user/index',
  meta: {
    hideChildrenInMenu: true,
    orderNo: 1,
    icon: 'ion:layers-outline',
    title: '用户管理',
    roles: [RoleEnum.YYS, RoleEnum.JL],
  },

  children: [
    {
      path: 'index',
      name: 'UserIndex',
      component: () => import('@/views/user/index.vue'),
      meta: {
        title: '用户管理',
        hideMenu: true,
        icon: 'simple-icons:aboutdotme',
        roles: [RoleEnum.YYS, RoleEnum.JL],
      },
    },
  ],
};

export default user;
